<template>
  <view
    @click="clickUserProfile"
    style="
      position: fixed;
      width: 700rpx;
      background-color: #3775cb;
      bottom: 20rpx;
      right: 25rpx;
      border-radius: 10rpx;
      padding: 12rpx 15rpx;
      text-align: center;
      line-height: 50rpx;
      color: #ffffff;
    "
  >
    发消息
  </view>
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'
import * as ww from '@wecom/jssdk'
import { createJsapiSignatureAPI } from '@/services/common'
import { registerApi } from '@/utils/wecom'

const props = defineProps<{
  qwExternalUserid: string
}>()
const clickUserProfile = async (row: any) => {
  ww.openUserProfile({
    type: 2,
    userid: props.qwExternalUserid,
  })
}

onMounted(async () => {
  await registerApi(['openUserProfile'])
})
</script>

<style scoped lang="scss"></style>
